﻿<?php 
class Form_NewsForm extends Zend_Form
{
	public function init()
	{
		$this->addElement('text','n_tieude:',array(
				'required'   => true,
				'label'      => 'Tiêu đề tin:',
			));
			
		$this->addElement('textarea','n_noidung:',array(
				'required'   => true,
				'label'      => 'Nội dung tin:',
		));	
		$element = new Zend_Form_Element_File('image');
		$element->setLabel('Ảnh đại diện:')
				->setDestination("/home/vhosts/shoppingcartcnpm.orgfree.com/public/images/news");
		$element->addValidator('Extension',false,'jpg,png,gif');
		$this->addElement($element,'image');		
		$this->addElement('submit','Tạo');
	}
}